package com.tao.graduation.Service.Impl;

import com.tao.graduation.Dao.PatientDao;
import com.tao.graduation.Pojo.Appointment;
import com.tao.graduation.Pojo.Doctor;
import com.tao.graduation.Pojo.Option;
import com.tao.graduation.Pojo.Patient;
import com.tao.graduation.Service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PatientServiceImpl implements PatientService {

    @Autowired
    private PatientDao patientDao;
    @Override
    public Patient queryPatientByUsername(Integer id) {
        return patientDao.queryPatientByUsername(id);
    }

    @Override
    public List<Option> queryOption() {
        return patientDao.queryOption();
    }

    @Override
    public Map<String, String> queryPatientInfo(Integer id) {
        return patientDao.queryPatientInfo(id);
    }

    @Override
    public List<Doctor> queryDoctorByOptionType(String name) {
        return patientDao.queryDoctorByOptionType(name);
    }

    @Override
    public int Appointment(Appointment appointment) {
        return patientDao.Appointment(appointment);
    }

    @Override
    public List<Map<String, String>> AppointmentRecord(Integer id) {
        return patientDao.AppointmentRecord(id);
    }

    @Override
    public List<Doctor> queryDoctor() {
        return patientDao.queryDoctor();
    }

    @Override
    public int CanOrder(int id) {
        return patientDao.CanOrder(id);
    }

    @Override
    public int insertSelfInfo(Patient patient) {
        return patientDao.insertSelfInfo(patient);
    }
}
